package com.sokal.easycare.modules.payment.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sokal.easycare.common.service.CrudService;
import com.sokal.easycare.modules.payment.dao.TransactionRecordDao;
import com.sokal.easycare.modules.payment.entity.TransactionRecord;
import com.sokal.easycare.modules.sys.dao.UserBankAccountDao;
import com.sokal.easycare.modules.sys.entity.UserBankAccount;

/** 
* 提现审核
* @author lihaipei
* @date 2017年5月26日 下午2:46:51 
*/
@Service
@Transactional(readOnly = true)
public class TransactionRecordService extends CrudService<TransactionRecordDao, TransactionRecord> {

	@Autowired
	private UserBankAccountDao userBankAccountDao;
	
	/**
	 * 获取单条数据
	 * @param id
	 * @return
	 */
	public TransactionRecord get(String id) {
		TransactionRecord _transactionRecord=dao.get(id);
		if(_transactionRecord.getBankAccount()!=null){
			_transactionRecord.setBankAccount(userBankAccountDao.get(_transactionRecord.getBankAccount()));
		}
		return _transactionRecord;
	}
}
